package com.hc.serviceimp;

import java.util.List;

import com.hc.dao.RentDao;
import com.hc.daoimp.RentDaoImpl;
import com.hc.entity.House;
import com.hc.entity.Rent;
import com.hc.entity.Tenant;
import com.hc.service.RentService;

public class RentServiceImpl implements RentService{

	//创建rentdao层实例对象
	RentDao rDao=new RentDaoImpl();
	
	@Override
	public List<Tenant> getallteant() {
		List<Tenant> getallteant = rDao.getallteant();
		return getallteant;
	}

	@Override
	public List<House> getallhouse() {
		List<House> getallhouse = rDao.getallhouse();
		
		return getallhouse;
	}

	@Override
	public void addrent(Rent rent) {
		rDao.addrent(rent);
		
	}

	@Override
	public List<Rent> select(String name, String date, int phone) {
		List<Rent> select = rDao.select(name, date, phone);
		return select;
	}

	@Override
	public Rent show(int id) {
		Rent show = rDao.show(id);
		
		return show;
	}

	@Override
	public void update(Rent rent) {
		rDao.update(rent);
		
	}

	@Override
	public void del(int id) {
		rDao.del(id);
		
		
	}
	
	

	
}
